package cn.kgc.tangcco.pojo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author 李昊哲
 * @Description
 * @create 2020/12/29 14:22
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Entity
@Table(name = "idiom")
public class Idiom implements Serializable {
    private static final long serialVersionUID = -7542187511417900265L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;

    @Column(name = "name")
    private String name;

    @Column(name = "spell")
    private String spell;

    @Column(name = "content")
    private String content;

    @Column(name = "derivation")
    private String derivation;

    @Column(name = "samples")
    private String samples;

    public Idiom(String name, String spell, String content, String derivation, String samples) {
        this.name = name;
        this.spell = spell;
        this.content = content;
        this.derivation = derivation;
        this.samples = samples;
    }
}
